import 'package:azlistview/azlistview.dart';
import 'package:library_base/entities/generated/json/base/json_field.dart';
import 'package:library_base/entities/generated/json/goods_entity.g.dart';
import 'dart:convert';

import 'goods_child_entity.dart';

@JsonSerializable()
class GoodsEntity extends ISuspensionBean {
  late List<GoodsChildEntity> records;

  late int total;
  late int size;
  late int current;
  late int pages;

  String? tagIndex;
  String? namePinyin;
  bool isSelect = false;

  GoodsEntity();

  factory GoodsEntity.fromJson(Map<String, dynamic> json) => $GoodsEntityFromJson(json);

  Map<String, dynamic> toJson() => $GoodsEntityToJson(this);

  @override
  String getSuspensionTag() => tagIndex!;

  @override
  String toString() => json.encode(this);
}
